<template>
	<el-card>
		<el-tabs tab-position="left" v-model="groupId" @tab-change="tabChange">
			<el-tab-pane label="人事档案" name="baseinfo">
				<component v-if="isComponent=='baseinfo'" :is="isComponent"/>
			</el-tab-pane>
			<el-tab-pane label="人事合同" name="contract">
				<component v-if="isComponent=='contract'" :is="isComponent"/>
			</el-tab-pane>
			<el-tab-pane label="人员奖惩" name="incentive">
				<component v-if="isComponent=='incentive'" :is="isComponent"/>
			</el-tab-pane>
			<el-tab-pane label="人员证照" name="licence">
				<component v-if="isComponent=='licence'" :is="isComponent"/>
			</el-tab-pane>
			<el-tab-pane label="学习经历" name="learn">
				<component v-if="isComponent=='learn'" :is="isComponent"/>
			</el-tab-pane>
			<el-tab-pane label="劳动技能" name="skills">
				<component v-if="isComponent=='skills'" :is="isComponent"/>
			</el-tab-pane>
			<el-tab-pane label="人事调动" name="transfer">
				<component v-if="isComponent=='transfer'" :is="isComponent"/>
			</el-tab-pane>
			<el-tab-pane label="人员离职" name="leave">
				<component v-if="isComponent=='leave'" :is="isComponent"/>
			</el-tab-pane>
			<el-tab-pane label="人员复职" name="reinstat">
				<component v-if="isComponent=='reinstat'" :is="isComponent"/>
			</el-tab-pane>
			<el-tab-pane label="职称评定" name="evaluation">
				<component v-if="isComponent=='evaluation'" :is="isComponent"/>
			</el-tab-pane>
			<el-tab-pane label="员工关怀" name="care">
				<component v-if="isComponent=='care'" :is="isComponent"/>
			</el-tab-pane>
		</el-tabs>
	</el-card>
</template>
<script>
import baseinfo from './baseinfo'
import contract from './contract'
import incentive from './incentive'
import licence from './licence'
import learn from './learn'
import skills from './skills'
import transfer from './transfer'
import leave from './leave'
import reinstat from './reinstat'
import evaluation from './evaluation'
import care from './care'
export default {
	components: {
		baseinfo,
		contract,
		incentive,
		licence,
		learn,
		skills,
		transfer,
		leave,
		reinstat,
		evaluation,
		care
	},
	data() {
		return {
			groupId: "baseinfo",
			isComponent: "baseinfo"
		}
	},
	methods: {
		tabChange(name) {
			this.isComponent = name;
		},
	}
};
</script>
